#ifndef __CLIENT__
#define __CLIENT__
#include <my_header.h>
#include <syslog.h>
#include <mysql/mysql.h>
#include <openssl/sha.h>

typedef struct train_s{
    int flag;//新增加的
    int length;
    char data[1000];        
}train_t;

int func_puts_client(int netfd, char * filename);
int func_gets_client(int netfd);
 char *file_sha1(const char *filename);
int recvn(int sockfd, void *buf, int length);
// 打印日志
#define SYSLOG_PRINTF(type,message) \
    do{ \
        time_t now = time(NULL); \
        char *time_cur=ctime(&now);\
        size_t len=strlen(time_cur);\
        if(len>0&&time_cur[len-1]=='\n'){\
            time_cur[len-1]='\0';\
        }\
        syslog(type,"当前时间为:%s,当前操作为:%s\n",time_cur,message);\
    }while(0)\

#endif
